package cn.fsd.nacos;

import cn.fsd.domain.Purchase_bill;
import cn.fsd.query.delivery.PurchaseBillQuery;
import cn.fsd.vo.storeroom.purchase.PurchaseBillCommodityVO;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import static cn.fsd.util.FeignConstant.DeliveryServiceUrl;

@Component
@FeignClient(value = "delivery-server",url = DeliveryServiceUrl)
public interface DeliveryServer {

    @PostMapping("/purchaseBill/find")
    PageInfo<PurchaseBillCommodityVO> getPurchaseBillByPage(@RequestBody PurchaseBillQuery query);

    @PostMapping("/purchaseBill/changeStatus")
    void changePurchase_status(@RequestBody Purchase_bill purchase_bill);
    @GetMapping("/purchaseBill/getById")
    Purchase_bill getPurchase_billById(@RequestParam String bill_id);
}
